USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'engage_subjects')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table engage_subjects  
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090826
-- Description:试题题库登记表
-- =============================================
CREATE TABLE [dbo].[engage_subjects](
	[sub_id] [smallint] IDENTITY(1,1) NOT NULL,
	[first_kind_id] [char](2) NULL,
	[first_kind_name] [varchar](60) NULL,
	[second_kind_id] [char](2) NULL,
	[second_kind_name] [varchar](60) NULL,
	[register] [int] NULL,
	[regist_time] [datetime] NULL,
	[derivation] [varchar](60) NULL,
	[content] [text] NULL,
	[key_a] [text] NULL,
	[key_b] [text] NULL,
	[key_c] [text] NULL,
	[key_d] [text] NULL,
	[key_e] [text] NULL,
	[correct_key] [varchar](10) NULL,
	[changer] [varchar](60) NULL,
	[change_time] [datetime] NULL,
 CONSTRAINT [engage_subjects_PK] PRIMARY KEY CLUSTERED 
(
	[sub_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-- ==============================================
-- 列名说明
-- ==============================================
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键，自动增长列' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'sub_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试题I级分类编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'first_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试题I级分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'first_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试题II级分类编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'second_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试题II级分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'second_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'register'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'regist_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试题出处' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'derivation'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'题干' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'答案a' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'key_a'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'答案b' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'key_b'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'答案c' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'key_c'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'答案d' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'key_d'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'答案e' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'key_e'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'正确答案' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'correct_key'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'变更人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'changer'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'变更时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'engage_subjects', @level2type=N'COLUMN',@level2name=N'change_time'